function net = add_pool_test(net, opts,id, stride, pad)
% --------------------------------------------------------------------
convOpts = {'CudnnWorkspaceLimit', opts.cudnnWorkspaceLimit} ;
net.layers{end+1} = struct('type', 'pool', 'name', sprintf('pool%s', id), ...
    'pool',stride,...
    'stride', stride, ...
    'pad', pad, ...
    'method','max',...
    'opts', {convOpts}) ;